import type {
  MedicinesParams,
  MedicinesRes,
  OrderDetail
} from '@/types/medicine'
import { request } from '@/utils/request'
// 获取订单详情 预支付
export const getMedicinerDetail = (params: MedicinesParams) => {
  return request<MedicinesRes>('patient/medicine/order/pre', 'GET', params)
}
// 根据处方id获取订单id
export const getOrderId = (data: {
  id: string
  addressId: string
  couponId: string
}) => {
  return request<{ id: string }>('patient/medicine/order', 'POST', data)
}
// 获取订单详情
export const getMedicineDetailPay = (id: string) => {
  return request<OrderDetail>(`patient/medicine/order/detail/${id}`)
}
